home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 1
/
Gold Medal Software Volume 1 (Gold Medal) (1994).iso
/
prog
/
dasv10_.arj
/
COMPINT.CPP
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1993-08-09
|
285 b
|
14 lines
// math.lib function compound_int()
#include <stdio.h>
#include <math.h>
void compound_int(double prin,double rate,int number)
{
int year;
double amount;
for (year=1;year<=number;year++) {
amount = prin * pow(1 + rate, year);
printf("%4d%21.2f\n",year,amount);
}
}